home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / tcl / testsuite / tcl.tests / tcl-test.exp
Text File  |  1993-04-12  |  2KB  |  72 lines

  1. #   Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
  2.  
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  14.  
  15. # Please email any bugs, comments, and/or additions to this file to:
  16. # bug-dejagnu@prep.ai.mit.edu
  17.  
  18. # This file was written by Rob Savoye. (rob@cygnus.com)
  19.  
  20. #
  21. # the initial work on the version of these tests from the tcl release was done
  22. # by Mary Ann May-Pumphrey of Sun Microsystems.
  23. #
  24. if $tracelevel then {
  25.     strace $tracelevel
  26.     }
  27.  
  28. expect_before buffer_full { error "Buffer full" }
  29. tcl_start
  30.  
  31. ###foreach file [glob -nocomplain $srcdir/$subdir/*.test] {
  32. foreach file [glob -nocomplain $srcdir/../tests/*.test] {
  33.     set command "unidentified test in $file"
  34.     send "source $file\n"
  35.     expect {
  36.     "source $file*\r\n\r\n\r\n" {
  37.         verbose "Sourcing test $file ..." 1
  38.         set timeoutmsg "Never got to the end of "
  39.         continue -expect
  40.     }
  41.     "\+\+\+*PASSED" {
  42.         regexp "\+\+\+\+ [file rootname [file tail $file]].* PASSED" $expect_out(buffer) tmp
  43.         pass [lindex $tmp 1]
  44.         continue -expect
  45.     }
  46.     "\+\+\+*FAILED" {
  47.         regexp "\+\+\+\+ [file rootname [file tail $file]].* FAILED" $expect_out(buffer) tmp
  48.         fail [lindex $tmp 1]
  49.         continue -expect
  50.     }
  51.     -re "^\r\n% $" {
  52.         verbose "$file done" 1
  53.         }
  54.     "*Error: bad option *" {
  55.         fail "$command (Got a bad option)"
  56.     }
  57.     timeout {
  58.         error "$timeoutmsg $file"
  59.     }
  60.     }
  61. }
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.